<template>
	<u-popup :show="show" mode="bottom"  @close="close">
	        <view class="choPop">
	           <view class="choPopTitle">选择头像来源</view>
			   <view class="topchi">
				   <view class="fkchi" @click="setModel(1)">
					   <image src="/static/myimages/m4.png" mode="widthFix" style="width: 30rpx;margin-right: 10rpx;"></image>
					   拍照
					</view>
				   <view class="fkchi" @click="setModel(0)">
					   <image src="/static/myimages/m5.png" mode="widthFix" style="width: 30rpx;margin-right: 10rpx;"></image>
					   从相册选择
					</view>
			   </view>
			   <view class="close" @click="close">取消</view>
	        </view>
		</u-popup>
</template>

<script>
	export default{
		props: {
			show: {
				type: Boolean,
				default: false
			}
		},
		data(){
			return{
				
			}
		},
		methods:{
			setModel(type){
				this.$emit('setSuccess',type)
			},
			
			// 取消
			close(){
				this.$emit('success')
			}
		}
	}
</script>

<style scoped>
	.choPopTitle{
		font-size: 36rpx;
		font-weight: 500;
		color: #FFFFFF;
		opacity: 0.8;
	}
	.fkchi{
		width: 317rpx;
		height: 90rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		background-color: #223A5F;
		border: 2rpx solid #2F61B2;
		border-radius: 20rpx;
		color: #2F61B2;
	}
	.topchi{
		width: 670rpx;
		height: 96rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.close{
		width: 670rpx;
		height: 96rpx;
		background-color: #1E293B;
		border: 2rpx solid #2F61B2;
		border-radius: 20rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 30rpx;
		color: #2F61B2;
	}
	.choPop{
		width: 100%;
		height: 390rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		background-color:#1D2839;
		padding: 40rpx 0;
		box-sizing: border-box;
	}
</style>